From f4dead26c92e2ef6be45af0eb56d12bb3a00d983 Mon Sep 17 00:00:00 2001 From: secondl1ght <85003930+secondl1ght@users.noreply.github.com> Date: Sat, 24 Sep 2022 22:20:18 -0600 Subject: lots of style updates after design review, bug fixes, and more improve --- src/routes/[username]/dashboard/+page.svelte | 39 ++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'src/routes/[username]/dashboard') diff --git a/src/routes/[username]/dashboard/+page.svelte b/src/routes/[username]/dashboard/+page.svelte index 7e424819..4c0917dc 100644 --- a/src/routes/[username]/dashboard/+page.svelte +++ b/src/routes/[username]/dashboard/+page.svelte @@ -11,7 +11,8 @@ let payreq = '', payreqField, - withdrawing; + withdrawing, + loading; let toggle = async () => { payreq = ''; @@ -21,11 +22,14 @@ }; let withdraw = async () => { + loading = true; try { await post('/withdraw', { payreq }); withdrawing = false; + loading = false; } catch (e) { failure(e.message); + loading = false; } }; @@ -40,8 +44,8 @@ -
-

{user.username}

+
+

{user.username}

{user.address}
@@ -81,7 +85,7 @@ {:else}
@@ -110,8 +114,33 @@ class="{!payreq ? 'opacity-50' : 'opacity-100 hover:opacity-80'} rounded-2xl border py-3 font-bold w-full mt-2 bg-black text-white" - on:click={withdraw}>{$t('user.dashboard.send')} + {#if loading} + + + + + {:else} + {$t('user.dashboard.send')} + {/if} +
{/if}
-- cgit v1.2.3